// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#ifndef TESSELLATEATTRIBUTES_H
#define TESSELLATEATTRIBUTES_H
#include <AttributeSubject.h>


// ****************************************************************************
// Class: TessellateAttributes
//
// Purpose:
//    Attributes for the Tessellate Operator
//
// Notes:      Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//
// ****************************************************************************

class TessellateAttributes : public AttributeSubject
{
public:
    // These constructors are for objects of this class
    TessellateAttributes();
    TessellateAttributes(const TessellateAttributes &obj);
protected:
    // These constructors are for objects derived from this class
    TessellateAttributes(private_tmfs_t tmfs);
    TessellateAttributes(const TessellateAttributes &obj, private_tmfs_t tmfs);
public:
    virtual ~TessellateAttributes();

    virtual TessellateAttributes& operator = (const TessellateAttributes &obj);
    virtual bool operator == (const TessellateAttributes &obj) const;
    virtual bool operator != (const TessellateAttributes &obj) const;
private:
    void Init();
    void Copy(const TessellateAttributes &obj);
public:

    virtual const std::string TypeName() const;
    virtual bool CopyAttributes(const AttributeGroup *);
    virtual AttributeSubject *CreateCompatible(const std::string &) const;
    virtual AttributeSubject *NewInstance(bool) const;

    // Property selection methods
    virtual void SelectAll();

    // Property setting methods
    void SetChordError(double chordError_);
    void SetFieldCriterion(double fieldCriterion_);
    void SetMergePoints(bool mergePoints_);

    // Property getting methods
    double GetChordError() const;
    double GetFieldCriterion() const;
    bool   GetMergePoints() const;

    // Persistence methods
    virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
    virtual void SetFromNode(DataNode *node);


    // Keyframing methods
    virtual std::string               GetFieldName(int index) const;
    virtual AttributeGroup::FieldType GetFieldType(int index) const;
    virtual std::string               GetFieldTypeName(int index) const;
    virtual bool                      FieldsEqual(int index, const AttributeGroup *rhs) const;


    // IDs that can be used to identify fields in case statements
    enum {
        ID_chordError = 0,
        ID_fieldCriterion,
        ID_mergePoints,
        ID__LAST
    };

private:
    double chordError;
    double fieldCriterion;
    bool   mergePoints;

    // Static class format string for type map.
    static const char *TypeMapFormatString;
    static const private_tmfs_t TmfsStruct;
};
#define TESSELLATEATTRIBUTES_TMFS "ddb"

#endif
